package com.jy.adscm.operation.mscyb.controller;


import com.jy.adscm.exception.AdscmSystemException;
import com.jy.adscm.operation.mscyb.bean.JqbzPartsUseHistory;
import com.jy.adscm.operation.mscyb.bean.JqbzResult;
import com.jy.adscm.operation.mscyb.service.JqbzPartsUseHistoryService;
import com.jy.adscm.support.SimpleCoreResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author zyl
 * @since 2019-06-03
 */
@RestController
@RequestMapping("/adscm/operation/jqbz/jqbzPartsUseHistory")
public class JqbzPartsUseHistoryController {
    @Autowired
    JqbzPartsUseHistoryService jqbzPartsUseHistoryService;
    @RequestMapping("selectByPid/{pid}")
    public SimpleCoreResponse selectByPid(@PathVariable String pid, HttpServletRequest request) throws AdscmSystemException {
        List<JqbzPartsUseHistory> JqbzPartsUseHistorys=jqbzPartsUseHistoryService.selectByPid(pid);
        return new SimpleCoreResponse("200","查询成功",JqbzPartsUseHistorys);
    }
}

